<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript">
	$(function(){
		$('#b1').click(function(){
			var $obj = $('ul li');
			//alert($obj.length);
			
			//遍历
			$obj.each(function(i){
				//i:表示正在被遍历的节点下标，从0开始
				if(i == 0){
					$(this).css('font-size','60px');
				}else if(i == 1){
					$(this).css('font-style','italic');
				}else{
					$(this).css('color','red');
				}
			})
		});
	});
</script>
</head>
<body>
	<ul>
		<li>item1</li>
		<li>item2</li>
		<li>item3</li>
	</ul>
	<input type="button" value="点击" id="b1"/>
</body>
</html>